﻿<div class="row justify-content-end p-5">
    <button *ngIf="'Pages.Administration.DynamicEntityProperties.Create' | permission"
            class="btn btn-primary" (click)="addNewDynamicEntityProperty()"><i
        class="fa fa-plus"></i>{{"AddNewDynamicEntityProperty" | localize}}</button>
</div>
<div class="row align-items-center">
    <!--<Primeng-TurboTable-Start>-->
    <div class="col primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
        <p-table #dataTable (onLazyLoad)="getDynamicEntityProperties()"
                 [value]="primengTableHelper.records"
                 rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false"
                 [lazy]="true" [responsive]="primengTableHelper.isResponsive">
            <ng-template pTemplate="header">
                <tr>
                    <th style="width: 100px;"></th>
                    <th>{{ 'EntityFullName' | localize}}</th>
                </tr>
            </ng-template>
            <ng-template pTemplate="body" let-record="$implicit">
                <tr>
                    <td>
                        <button class="btn btn-primary" *ngIf="'Pages.Administration.DynamicEntityProperties.Edit' | permission"
                                (click)="gotoEdit(record.entityFullName)">{{'Detail' | localize}}</button>
                    </td>
                    <td>
                        {{record.entityFullName}}
                    </td>
                </tr>
            </ng-template>
        </p-table>
        <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
            {{'NoData' | localize}}
        </div>
    </div>
    <!--<Primeng-TurboTable-End>-->
</div>
<select-and-entity-modal #selectAnEntityModal (modalSave)="gotoEdit($event)"></select-and-entity-modal>
